#!/bin/sh
# 设置成linux对应的
go mod tidy
set GOARCH=amd64
go env -w GOARCH=amd64
set GOOS=linux
go env -w GOOS=linux

swag init
echo "swagger生成完成"

go build -o cec-server main.go

echo "go build success"


# 还原之前的编译环境
set GOARCH=amd64
go env -w GOARCH=amd64
set GOOS=windows
go env -w GOOS=windows

#echo "go build"
#go mod tidy
#CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o cec-server main.go
#chmod +x ./cec-server
#echo "go build success"



